from src import RandomForest
from src import solver as Solver
import pandas as pd
points=pd.read_excel('data/points/points.xlsx')
points.sort_values(by=['x','t'],inplace=True)
points.reset_index(drop=True,inplace=True)

cases = ['A', 'B', 'C', 'D', 'E', 'F']
all_data = []
x0s=[[-2,2,0,-3,2],
    [-2,2,-3,2,0],
    [-2,2,2,0,-3],
    [-2,2,0,2,-3],
    [-2,2,2,0,-3],
    [-2,2,-3,0,2]
    ]
us=[Solver.solve_3(*i) for i in x0s]
all_data=[Solver.calculate(i,points) for i in us]
# 训练模型并可视化
RandomForest.train_and_visualize(cases,all_data)    